<?php
/**
 * @orm tablename newsletter_items
 */
class NewsLetterItem_Basic extends NewsLetterItem{
	
	/**
	 * @orm char(255)
	 */
	public $title;
	/**
	 * @orm longtext
	 */
	public $contents;
	/**
	 * @orm char(255)
	 */
	public $link;
	/**
	 * @orm plugin DomArImage({autoRename=3})
	 * @orm listener afterAdd afterAddImage
	 */
	public $image;
	/**
	 * @var String [left, right, top, bottom]
	 * @orm char(10)
	 */
	public $imageLocation;
	/**
	 * @orm char(255)
	 */
	public $imageLink;
	
	public function render( ) {
		$view = $this->letter->getNewView( 'basic.html' );
		$view->item = $this;
		return $view->fetch();
	}
	
	public function afterAddImage() {
		if( $this->image->exists() ) {
			
		}
	}
	
	
}
?>